﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script src="~/js/jquery-1.11.1.js"></script>
    <link href="~/css/table.css" rel="stylesheet" />
    <link href="~/css/cwcalendar.css" rel="stylesheet" />
    <script src="~/javascript/comm/comm.js"></script>
    <script src="~/javascript/comm/list.js"></script>
    <script src="~/javascript/calendar-ch.js"></script>
    <script src="~/javascript/jquery-1.7.2.js"></script>
    <script src="~/javascript/locate.js"></script>
    <script src="~/javascript/select.js"></script>
    <script src="~/javascript/comm/time.js"></script>
    <script src="~/js/vue.js"></script>
</head>

<body>
    <div id="app">
            <input type="hidden" id="where" value="@ViewData["where"]" />
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">
                            您正在做的业务是：人力资源--招聘管理--简历管理--有效简历列表
                        </font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <input type="button" value="返回" class="BUTTON_STYLE1" onclick="history.back();">
                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr>
                    <td width="15%" class="TD_STYLE1">
                        档案编号
                    </td>
                    <td width="15%" class="TD_STYLE1">
                        姓名
                    </td>
                    <td width="15%" class="TD_STYLE1">
                        性别
                    </td>
                    <td width="15%" class="TD_STYLE1">
                        职位分类
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        职位名称
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        电话号码
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        复核状态
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        面试状态
                    </td>
                </tr>


                <tr v-for="(item,index) in dt" :key="index">
                    <td class="TD_STYLE2">
                        <a :href="'/resume/resume_details/'+[item.res_id]">{{item.res_id}}</a>
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_name}}
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_sex}}
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_major_kind_name}}
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_major_name}}
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_telephone}}
                    </td>
                    <td class="TD_STYLE2">
                        <input type="hidden" class="status" :value="item.check_status">
                        <input v-if="item.check_status== '1'" type="text" class="text-success" disabled value="通过">
                        <input v-if=" item.check_status== '0'" type="text" class="text-danger" disabled value="未通过">
                    </td>
                    <td class="TD_STYLE2">                        
                        <input type="hidden" class="status" :value="item.interview_status">
                        <input v-if="item.interview_status== '1'" type="text" class="text-success" disabled value="已面试">
                        <input v-if="item.interview_status== '0'" type="text" class="text-danger" disabled value="待面试">
                    </td>
                </tr>

            </table>
            <div align="center" style="font-size: 18px;color: gray">
                &nbsp;&nbsp;总数：
                <font style="color: maroon;font-weight: bold;">{{rows}}</font>
                例
                &nbsp;&nbsp;&nbsp;
                每页显示 <font style="color: maroon;font-weight: bold;">{{pageSize}}</font>
                条
                &nbsp;&nbsp;&nbsp;
                当前第 <font style="color: maroon;font-weight: bold;">{{currentPage}}</font>
                页
                &nbsp;&nbsp;&nbsp;共
                <font style="color: maroon;font-weight: bold;">{{pages}}</font>
                页
                <a style="color: navy;font-weight: bold" v-on:click="first()">首页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="prev()">上一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="next()">下一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="last()">末页</a>
                &nbsp;&nbsp;&nbsp;跳到第
                <input id=page type=text v-model="tpage" class=input1 size=1>
                页&nbsp;&nbsp;
                <input type="image" v-on:click="tiao()" src="~/images/go.bmp" width=18 height=18 border=0>
            </div>
    </div>
</body>
</html>

<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            dt: [],//要显示的数据
            rows: 0,//总个数
            pages: 0,//总页数
            currentPage: 1,//当前页
            pageSize: 3,//一页几个
            tpage: 1,//要跳的页数
            where: $("#where").val(),
        },
        methods: {
            load: function () {
                var t = this;
                $.ajax({
                    url: "/resume/valid_list",
                    type: "post",
                    data: { "currentPage": t.currentPage, "where": t.where},
                    success: function (msg) {
                        var d = eval("(" + msg + ")");
                        t.dt = d["list"];
                        t.rows = d["rows"];
                        t.pages = d["pages"];
                    }
                });
            },
            first: function () {
                this.currentPage = 1;
                this.load();
            },
            prev: function () {
                if (this.currentPage > 1) {
                    this.currentPage = this.currentPage - 1;
                    this.load();
                }
            },
            next: function () {
                if (this.currentPage < this.pages) {
                    this.currentPage = this.currentPage + 1;
                    this.load();
                }

            },
            last: function () {
                this.currentPage = this.pages;
                this.load();
            },
            tiao: function () {
                if (this.tpage > 0 && this.tpage <= this.pages) {
                    this.currentPage = this.tpage;
                    this.load();
                }
            }
        },
        mounted: function () {
            this.load();
        }
    });
</script>
